/**
 * 
 */
package com.greenx.hello.hsynchronize;

/**
 * @author StephenXianweiZhang
 * 
 */
public class HelloSysnchronize {

	private static Boolean runningFlag = false;

	public static void run() {

		synchronized (runningFlag) {
			if (runningFlag == false) {
				runningFlag = true;
			}
		}

	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println(HelloSysnchronize.runningFlag);
		HelloSysnchronize.run();
		System.out.println(HelloSysnchronize.runningFlag);
	}

}
